function other(){/*
  Highcharts.theme = {
	colors : [ '#ED561B','#058DC7', '#50B432',  '#DDDF00', '#24CBE5',
			'#64E572', '#FF9655', '#FFF263', '#6AF9C4' ],
	chart : {
		backgroundColor : {
			linearGradient : [ 0, 0, 500, 500 ],
			stops : [ [ 0, 'rgb(255, 255, 255)' ], [ 1, 'rgb(240, 240, 255)' ] ]
		},
		borderWidth : 0,
		plotBackgroundColor : 'rgba(255, 255, 255, .9)',
		plotShadow : true,
		plotBorderWidth : 1
	},
	title : {
		style : {
			color : '#000',
			font : 'bold 16px "Trebuchet MS", Verdana, sans-serif'
		}
	},
	subtitle : {
		style : {
			color : '#666666',
			font : 'bold 12px "Trebuchet MS", Verdana, sans-serif'
		}
	},
	xAxis : {
		gridLineWidth : 1,
		lineColor : '#000',
		tickColor : '#000',
		labels : {
			style : {
				color : '#000',
				font : '11px Trebuchet MS, Verdana, sans-serif'
			}
		},
		title : {
			style : {
				color : '#333',
				fontWeight : 'bold',
				fontSize : '12px',
				fontFamily : 'Trebuchet MS, Verdana, sans-serif'

			}
		}
	},
	yAxis : {
		minorTickInterval : 'auto',
		lineColor : '#000',
		lineWidth : 1,
		tickWidth : 1,
		tickColor : '#000',
		labels : {
			style : {
				color : '#000',
				font : '11px Trebuchet MS, Verdana, sans-serif'
			}
		},
		title : {
			style : {
				color : '#333',
				fontWeight : 'bold',
				fontSize : '12px',
				fontFamily : 'Trebuchet MS, Verdana, sans-serif'
			}
		}
	},
	legend : {
		itemStyle : {
			font : '9pt Trebuchet MS, Verdana, sans-serif',
			color : 'black'

		},
		itemHoverStyle : {
			color : '#039'
		},
		itemHiddenStyle : {
			color : 'gray'
		}
	},
	labels : {
		style : {
			color : '#99b'
		}
	}
};

// Apply the theme
var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
var options = {
	 chart: {
         renderTo: 'container',
         defaultSeriesType: 'column'
      },
      title: {
         text: 'LDKT and CDKT in 2010'
      },
      xAxis: {
         categories: [],
		title: {
			text: 'Time(M)'
		}
      },
      yAxis: {
         min: 0,
         title: {
            text: 'KTx No.'
         },
         stackLabels: {
            enabled: true,
            style: {
               fontWeight: 'bold',
               color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
            }
         }
      },
      legend: {
        align: 'center',
         x: 0,
         verticalAlign: 'bottom',
         y: 0,
         floating: false,
         backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColorSolid) || 'white',
         borderColor: '#CCC',
         borderWidth: 1,
         shadow: false
      },
      tooltip: {
         formatter: function() {
            return '<b>'+ this.x +'</b><br/>'+
                this.series.name +': '+ this.y +'<br/>'+
                'Total: '+ this.point.stackTotal;
         }
      },
      plotOptions: {
         column: {
            stacking: 'normal',
            dataLabels: {
               enabled: true,
               color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white'
            }
         }
      },
       series: []
};
Highcharts.theme = {
   colors: ['#058DC7', '#50B432', '#ED561B', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4'],
   chart: {
      backgroundColor: {
         linearGradient: [0, 0, 500, 500],
         stops: [
            [0, 'rgb(255, 255, 255)'],
            [1, 'rgb(240, 240, 255)']
         ]
      }
,
      borderWidth: 2,
      plotBackgroundColor: 'rgba(255, 255, 255, .9)',
      plotShadow: true,
      plotBorderWidth: 1
   },
   title: {
      style: { 
         color: '#000',
         font: 'bold 16px "Times New Roman"'
      }
   },
   subtitle: {
      style: { 
         color: '#666666',
         font: 'bold 12px "Times New Roman"'
      }
   },
   xAxis: {
      gridLineWidth: 1,
      lineColor: '#000',
      tickColor: '#000',
      labels: {
         style: {
            color: '#000',
            font: '11px "Times New Roman"'
         }
      },
      title: {
         style: {
            color: '#333',
            fontWeight: 'bold',
            fontSize: '14px',
            fontFamily: '"Times New Roman"'

         }            
      }
   },
   yAxis: {
      minorTickInterval: 'auto',
      lineColor: '#000',
      lineWidth: 1,
      tickWidth: 1,
      tickColor: '#000',
      labels: {
         style: {
            color: '#000',
            font: '12px "Times New Roman"'
         }
      },
      title: {
         style: {
    	  fontWeight: 'normal',
            color: '#333',
            fontSize: '14px',
            fontFamily: '"Times New Roman"'
            //fontFamily: ' "Lucida Grande","Lucida Sans Unicode",Verdana,Arial,Helvetica,sans-serif;'
         }            
      }
   },
   legend: {
      itemStyle: {         
         font: '9pt "Times New Roman"',
         color: 'black'

      },
      itemHoverStyle: {
         color: '#039'
      },
      itemHiddenStyle: {
         color: 'gray'
      }
   },
   labels: {
      style: {
         color: '#99b'
      }
   }
};
*/
}
Highcharts.theme = {
	colors : [ '#D92940','#058DC7', '#50B432',  '#DDDF00', '#24CBE5',
			'#64E572', '#FF9655', '#FFF263', '#6AF9C4' ],
	chart : {		
		borderWidth : 0,
		plotBackgroundColor : 'rgba(255, 255, 255, .9)',
		plotShadow : true,
		plotBorderWidth : 1
	},
	title : {
		style : {
			color : '#000',
			font : 'bold 16px "Trebuchet MS", Verdana, sans-serif'
		}
	},
	subtitle : {
		style : {
			color : '#666666',
			font : 'bold 12px "Trebuchet MS", Verdana, sans-serif'
		}
	},
	xAxis : {
		gridLineWidth : 1,
		lineColor : '#000',
		tickColor : '#000',
		labels : {
			style : {
				color : '#000',
				font : '11px Trebuchet MS, Verdana, sans-serif'
			}
		},
		title : {
			style : {
				color : '#333',
				fontWeight : 'bold',
				fontSize : '12px',
				fontFamily : 'Trebuchet MS, Verdana, sans-serif'

			}
		}
	},
	yAxis : {
		minorTickInterval : 'auto',
		lineColor : '#000',
		lineWidth : 1,
		tickWidth : 1,
		tickColor : '#000',
		labels : {
			style : {
				color : '#000',
				font : '11px Trebuchet MS, Verdana, sans-serif'
			}
		},
		title : {
			style : {
				color : '#333',
				fontWeight : 'bold',
				fontSize : '12px',
				fontFamily : 'Trebuchet MS, Verdana, sans-serif'
			}
		}
	},
	legend : {
		itemStyle : {
			font : '9pt Trebuchet MS, Verdana, sans-serif',
			color : 'black'

		},
		itemHoverStyle : {
			color : '#039'
		},
		itemHiddenStyle : {
			color : 'gray'
		}
	},
	labels : {
		style : {
			color : '#99b'
		}
	}
};
// Apply the theme
var highchartsOptions = Highcharts.setOptions(Highcharts.theme);

// On document ready, call visualize on the datatable.
options = {
		   chart: {
		      renderTo: 'container',
		      defaultSeriesType: 'column',
		      width:780
		   },
		   title: {
		      text: ''
		   },
		   xAxis: {
			   title: {
				text: ''
			}
		   },
		   yAxis: {
		      title: {
		         text: ''
		      }
		   },
		   tooltip: {
		      formatter: function() {
			        return this.series.name+"/"+this.x+"<br/>"+this.y ;
		      }
		   },
		   series: []
		};	

function init(){
	var year=new Date().getFullYear();
		var box=$("#box");
		for(var i=year;i>=2007;i--){
			box.append("<div><a href='#' name='chart'>"+i+" "+"LTx</a></div>");
			box.append("<div><a href='#' name='chart'>"+i+" "+"KTx</a></div>");
		}
		box.append("<div><a href='#' name='chart'>2007-"+year+" "+"LTx</a></div>");
		box.append("<div><a href='#' name='chart'>2007-"+year+" "+"KTx</a></div>");
		box.append("<div><a  href='"+basePath+"jsp/prjs/chart.jsp'>其它</a></div>");
		$("a[name='chart']").bind("click",function(event){
				$("a[name='chart']").css("color","#7D7C7F");
				this.style.color="red";
				var chartContainer=document.getElementById("chartContainer");
				if( null == chartContainer ){
					$("#parentContainer").html('<div style="width: 780px; " id="chartContainer" align="left" ></div>');
					chartContainer=document.getElementById("chartContainer");
				}
				chartContainer.innerHTML="";
				getChart($(event.target).text());				
				return false;
		});
}

function getChart(arrayStr){
	var str=arrayStr.split(" ");
		var condition="";
		if(str[0].length == 4){
			condition ="{p114:"+str[0]+",p105:"+((str[1]=='LTx')?1:2)+"}";
		}else {
			var years=str[0].split("-");
			if(years.length>1){
				var year="[";
				for(var i=years[0];i<years[1];i++){
					year+=i+",";
				}
				year=year.substring(0,year.length-1)+"]";
				condition ="{p114:"+year+",p105:"+((str[1]=='LTx')?1:2)+"}";
			}
		}
		$.ajax( {
		url : getActionUrl("getChart_1_0_3"),
		type : "POST",
		dataType : 'json',
		async : false,
		data:eval("("+condition+")"),
		success : function(msg) {
			/*
			此处接收的数据格式为：
			｛month:xx,data:{year:yyyy,countLDKT:xx,countCDKT:xx},txType:肝/肾等｝
			 ......
			  */
		if($.browser.msie){
			$("body").removeClass();
			$("#chartContainer").removeClass();
		}
		var headTitle="<br><div align='left'><font  style='font-family: 宋体 ;font-weight: bold;font-size:18px;'>"+str[0]+"年度"+((str[1]=='LTx')?'肝':'肾')+"移植例数统计</div>";
		$("#chartContainer").append(headTitle+'<div align="left" id="container" style="width: 800px;  margin: 0 auto;"></div><br/>');

		var seriesData="";	//按series的格式接收数据，最终转成json格式
		var xAxisCategories="";//X轴要展现的数据
		for(var j=0;j<msg[0].data.length;j++){					
				var dataCount="";//每一个图例中要展示的数据
				for ( var i = 0; i < msg.length; i++) {
					dataCount +=msg[i].data[j].count+"," ;//按数组的长度来分别接收每一个'year'下的数据count
					if(j==0){
						xAxisCategories+="'"+msg[i].month+"'," ;//x轴的数据由第一次遍历时读取
					}
				}
			seriesData+="{name:'" +msg[0].data[j].year + "',data:["+dataCount.substring(0,dataCount.length-1)+"]},";
		}
		options.xAxis.categories=eval("["+xAxisCategories.substring(0,xAxisCategories.length-1)+"]");//将读取到的数据转成json数组格式
		options.series=eval("["+seriesData.substring(0,seriesData.length-1)+"]");//将图例数据部分转成json数组格式
		options.xAxis.title.text="Time(M)";
		options.title.text=str[1]+" in "+str[0];
		options.yAxis.title.text=str[1]+" No.";
		
		getDataToTable(options.xAxis.categories,options.series);	
		chart = new Highcharts.Chart(options);//将此格式的options作为参数传给highcharts的Chart方法来生成chart实例
		},
		error : function() {
			alert('error');
		}
		});
}

function getDataToTable(xAxis,series){
		$("#chartContainer").append('<table class="mintable" align="left" id="datatable" width="780px" ></table>');
					var th=xAxis;
					var tr=series;
					var thStr="<tr ><th align='center'></th>";
					 for(var i=0;i<th.length;i++){
						thStr +="<th align='center'>"+th[i]+"</th>";
					}
					 thStr+="</tr>";
					 var trStr="<tr>";
					  for(var i=0;i<tr.length;i++){
						  trStr +="<th align='center'>"+tr[i].name+"</th>";
						for(var k=0;k<tr[i].data.length;k++){
							trStr +="<td align='center'>"+tr[i].data[k]+"</td>";
						}
						trStr +="</tr><tr>";
					}
					$("#datatable").append(thStr+trStr.substring(0,trStr.length-4));
					$("#chartContainer").append("<br/><br/> ");				
}





